package com.slipper.qmt.vo;

// 持仓
public class PositionVO {
    private String accountId; // string 资金账号
    private String exchangeId; // string 证券市场
    private String exchangeName; // string 市场名称
    private String productId; // string 品种代码
    private String productName; // string 品种名称
    private String instrumentId; // string 证券代码
    private String instrumentName; // string 证券名称
    private Integer hedgeFlag; // int EHedge_Flag_Type 类型，投保 ，股票不需要
    private Integer direction; // int EEntrustBS，买卖方向 对于股票该值始终是48
    private String openDate; // string 开仓日期 股票此字段无效
    private String tradeId; // string 成交号，最初开仓位的成交
    private Integer volume; // int 当前拥股/持仓量
    private Double openPrice; // float 持仓成本 ；持仓成本 = (总买入金额 - 总卖出金额) / 剩余数量
    private String tradingDay; // string 在实盘运行中是当前交易日，在回测中是股票最后交易过的日期
    private Double margin; // float 使用的保证金，历史的直接用ctp的，新的自己用成本价存量系数算，股票不需要
    private Double openCost; // float 开仓成本，等于成本价*第一次建仓的量，后续减持会影响，不算手续费，股票不需要
    private Double settlementPrice; // float 最新结算价/当前价
    private Integer closeVolume; // int 平仓量（对于股票不需要）
    private Double closeAmount; // float 平仓额（对于股票不需要）
    private Double floatProfit; // float 浮动盈亏
    private Double closeProfit; // float 平仓盈亏（对于股票不需要）
    private Double marketValue; // float 市值/合约价值
    private Double positionCost; // float 持仓成本（对于股票不需要）
    private Double positionProfit; // float 持仓盈亏（对于股票不需要）
    private Double lastSettlementPrice; // float 最新结算价（对于股票不需要）
    private Double instrumentValue; // float 合约价值（对于股票不需要）
    private Integer isToday; // bool 是否今仓
    private String stockHolder; // string 股东账号
    private Integer frozenVolume; // int 冻结数量
    private Integer canUseVolume; // int 可用余额
    private Integer onRoadVolume; // int 在途股份
    private Integer yesterdayVolume; // int 昨夜拥股
    private Double lastPrice; // float 最新价/当前价
    private Double avgOpenPrice; // float 开仓均价（对于股票不需要）
    private Double profitRate; // float 盈亏比例
    private Integer futureTradeType; // int EFutureTradeType 类型，成交类型
    private String expireDate; // string 到期日（针对逆回购）
    private String comTradeID; // string 组合成交号
    private Integer legId; // int 组合序号
    private Double totalCost; // float 累计成本（自定义，股票信用用到）
    private Double singleCost; // float 单股成本（自定义，股票信用用
    private Integer coveredVolume; // int 备兑数量，用于个股期权
    private Integer sideFlag; // int 持仓类型 ，用于个股期权，标记 '0' - 权利，'1' - 义务，'2' - '备兑'
    private Double referenceRate; // float 汇率，目前用于港股通
    private Double structFundVol; // float 分级基金可用（可分拆或可合并）
    private Double redemptionVolume; // float 分级基金可赎回量
    private Integer pREnableVolume; // int 申赎可用量（记录当日申购赎回的股票或基金数量）
    private Double realUsedMargin; // float 实时占用保证金，用于期权
    private Double royalty; // float 权利金
    private Double stockLastPrice; // float 标的证券最新价，用于期权
    private Double staticHoldMargin; // float 静态持仓占用保证金，用于期权
    private Integer optCombUsedVolume; // int 期权组合占用数量
    private Integer enableExerciseVolume; // int 能够行使的数量，用于个股期权
    private String accountKey; // string 账号key，唯一区别不同账号的key

    public String getAccountId() {
        return accountId;
    }

    public void setAccountId(String accountId) {
        this.accountId = accountId;
    }

    public String getExchangeId() {
        return exchangeId;
    }

    public void setExchangeId(String exchangeId) {
        this.exchangeId = exchangeId;
    }

    public String getExchangeName() {
        return exchangeName;
    }

    public void setExchangeName(String exchangeName) {
        this.exchangeName = exchangeName;
    }

    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getInstrumentId() {
        return instrumentId;
    }

    public void setInstrumentId(String instrumentId) {
        this.instrumentId = instrumentId;
    }

    public String getInstrumentName() {
        return instrumentName;
    }

    public void setInstrumentName(String instrumentName) {
        this.instrumentName = instrumentName;
    }

    public Integer getHedgeFlag() {
        return hedgeFlag;
    }

    public void setHedgeFlag(Integer hedgeFlag) {
        this.hedgeFlag = hedgeFlag;
    }

    public Integer getDirection() {
        return direction;
    }

    public void setDirection(Integer direction) {
        this.direction = direction;
    }

    public String getOpenDate() {
        return openDate;
    }

    public void setOpenDate(String openDate) {
        this.openDate = openDate;
    }

    public String getTradeId() {
        return tradeId;
    }

    public void setTradeId(String tradeId) {
        this.tradeId = tradeId;
    }

    public Integer getVolume() {
        return volume;
    }

    public void setVolume(Integer volume) {
        this.volume = volume;
    }

    public Double getOpenPrice() {
        return openPrice;
    }

    public void setOpenPrice(Double openPrice) {
        this.openPrice = openPrice;
    }

    public String getTradingDay() {
        return tradingDay;
    }

    public void setTradingDay(String tradingDay) {
        this.tradingDay = tradingDay;
    }

    public Double getMargin() {
        return margin;
    }

    public void setMargin(Double margin) {
        this.margin = margin;
    }

    public Double getOpenCost() {
        return openCost;
    }

    public void setOpenCost(Double openCost) {
        this.openCost = openCost;
    }

    public Double getSettlementPrice() {
        return settlementPrice;
    }

    public void setSettlementPrice(Double settlementPrice) {
        this.settlementPrice = settlementPrice;
    }

    public Integer getCloseVolume() {
        return closeVolume;
    }

    public void setCloseVolume(Integer closeVolume) {
        this.closeVolume = closeVolume;
    }

    public Double getCloseAmount() {
        return closeAmount;
    }

    public void setCloseAmount(Double closeAmount) {
        this.closeAmount = closeAmount;
    }

    public Double getFloatProfit() {
        return floatProfit;
    }

    public void setFloatProfit(Double floatProfit) {
        this.floatProfit = floatProfit;
    }

    public Double getCloseProfit() {
        return closeProfit;
    }

    public void setCloseProfit(Double closeProfit) {
        this.closeProfit = closeProfit;
    }

    public Double getMarketValue() {
        return marketValue;
    }

    public void setMarketValue(Double marketValue) {
        this.marketValue = marketValue;
    }

    public Double getPositionCost() {
        return positionCost;
    }

    public void setPositionCost(Double positionCost) {
        this.positionCost = positionCost;
    }

    public Double getPositionProfit() {
        return positionProfit;
    }

    public void setPositionProfit(Double positionProfit) {
        this.positionProfit = positionProfit;
    }

    public Double getLastSettlementPrice() {
        return lastSettlementPrice;
    }

    public void setLastSettlementPrice(Double lastSettlementPrice) {
        this.lastSettlementPrice = lastSettlementPrice;
    }

    public Double getInstrumentValue() {
        return instrumentValue;
    }

    public void setInstrumentValue(Double instrumentValue) {
        this.instrumentValue = instrumentValue;
    }

    public Integer getIsToday() {
        return isToday;
    }

    public void setIsToday(Integer isToday) {
        this.isToday = isToday;
    }

    public String getStockHolder() {
        return stockHolder;
    }

    public void setStockHolder(String stockHolder) {
        this.stockHolder = stockHolder;
    }

    public Integer getFrozenVolume() {
        return frozenVolume;
    }

    public void setFrozenVolume(Integer frozenVolume) {
        this.frozenVolume = frozenVolume;
    }

    public Integer getCanUseVolume() {
        return canUseVolume;
    }

    public void setCanUseVolume(Integer canUseVolume) {
        this.canUseVolume = canUseVolume;
    }

    public Integer getOnRoadVolume() {
        return onRoadVolume;
    }

    public void setOnRoadVolume(Integer onRoadVolume) {
        this.onRoadVolume = onRoadVolume;
    }

    public Integer getYesterdayVolume() {
        return yesterdayVolume;
    }

    public void setYesterdayVolume(Integer yesterdayVolume) {
        this.yesterdayVolume = yesterdayVolume;
    }

    public Double getLastPrice() {
        return lastPrice;
    }

    public void setLastPrice(Double lastPrice) {
        this.lastPrice = lastPrice;
    }

    public Double getAvgOpenPrice() {
        return avgOpenPrice;
    }

    public void setAvgOpenPrice(Double avgOpenPrice) {
        this.avgOpenPrice = avgOpenPrice;
    }

    public Double getProfitRate() {
        return profitRate;
    }

    public void setProfitRate(Double profitRate) {
        this.profitRate = profitRate;
    }

    public Integer getFutureTradeType() {
        return futureTradeType;
    }

    public void setFutureTradeType(Integer futureTradeType) {
        this.futureTradeType = futureTradeType;
    }

    public String getExpireDate() {
        return expireDate;
    }

    public void setExpireDate(String expireDate) {
        this.expireDate = expireDate;
    }

    public String getComTradeID() {
        return comTradeID;
    }

    public void setComTradeID(String comTradeID) {
        this.comTradeID = comTradeID;
    }

    public Integer getLegId() {
        return legId;
    }

    public void setLegId(Integer legId) {
        this.legId = legId;
    }

    public Double getTotalCost() {
        return totalCost;
    }

    public void setTotalCost(Double totalCost) {
        this.totalCost = totalCost;
    }

    public Double getSingleCost() {
        return singleCost;
    }

    public void setSingleCost(Double singleCost) {
        this.singleCost = singleCost;
    }

    public Integer getCoveredVolume() {
        return coveredVolume;
    }

    public void setCoveredVolume(Integer coveredVolume) {
        this.coveredVolume = coveredVolume;
    }

    public Integer getSideFlag() {
        return sideFlag;
    }

    public void setSideFlag(Integer sideFlag) {
        this.sideFlag = sideFlag;
    }

    public Double getReferenceRate() {
        return referenceRate;
    }

    public void setReferenceRate(Double referenceRate) {
        this.referenceRate = referenceRate;
    }

    public Double getStructFundVol() {
        return structFundVol;
    }

    public void setStructFundVol(Double structFundVol) {
        this.structFundVol = structFundVol;
    }

    public Double getRedemptionVolume() {
        return redemptionVolume;
    }

    public void setRedemptionVolume(Double redemptionVolume) {
        this.redemptionVolume = redemptionVolume;
    }

    public Integer getpREnableVolume() {
        return pREnableVolume;
    }

    public void setpREnableVolume(Integer pREnableVolume) {
        this.pREnableVolume = pREnableVolume;
    }

    public Double getRealUsedMargin() {
        return realUsedMargin;
    }

    public void setRealUsedMargin(Double realUsedMargin) {
        this.realUsedMargin = realUsedMargin;
    }

    public Double getRoyalty() {
        return royalty;
    }

    public void setRoyalty(Double royalty) {
        this.royalty = royalty;
    }

    public Double getStockLastPrice() {
        return stockLastPrice;
    }

    public void setStockLastPrice(Double stockLastPrice) {
        this.stockLastPrice = stockLastPrice;
    }

    public Double getStaticHoldMargin() {
        return staticHoldMargin;
    }

    public void setStaticHoldMargin(Double staticHoldMargin) {
        this.staticHoldMargin = staticHoldMargin;
    }

    public Integer getOptCombUsedVolume() {
        return optCombUsedVolume;
    }

    public void setOptCombUsedVolume(Integer optCombUsedVolume) {
        this.optCombUsedVolume = optCombUsedVolume;
    }

    public Integer getEnableExerciseVolume() {
        return enableExerciseVolume;
    }

    public void setEnableExerciseVolume(Integer enableExerciseVolume) {
        this.enableExerciseVolume = enableExerciseVolume;
    }

    public String getAccountKey() {
        return accountKey;
    }

    public void setAccountKey(String accountKey) {
        this.accountKey = accountKey;
    }

    @Override
    public String toString() {
        return "PositionVO{" +
                "accountId='" + accountId + '\'' +
                ", exchangeId='" + exchangeId + '\'' +
                ", exchangeName='" + exchangeName + '\'' +
                ", productId='" + productId + '\'' +
                ", productName='" + productName + '\'' +
                ", instrumentId='" + instrumentId + '\'' +
                ", instrumentName='" + instrumentName + '\'' +
                ", hedgeFlag=" + hedgeFlag +
                ", direction=" + direction +
                ", openDate='" + openDate + '\'' +
                ", tradeId='" + tradeId + '\'' +
                ", volume=" + volume +
                ", openPrice=" + openPrice +
                ", tradingDay='" + tradingDay + '\'' +
                ", margin=" + margin +
                ", openCost=" + openCost +
                ", settlementPrice=" + settlementPrice +
                ", closeVolume=" + closeVolume +
                ", closeAmount=" + closeAmount +
                ", floatProfit=" + floatProfit +
                ", closeProfit=" + closeProfit +
                ", marketValue=" + marketValue +
                ", positionCost=" + positionCost +
                ", positionProfit=" + positionProfit +
                ", lastSettlementPrice=" + lastSettlementPrice +
                ", instrumentValue=" + instrumentValue +
                ", isToday=" + isToday +
                ", stockHolder='" + stockHolder + '\'' +
                ", frozenVolume=" + frozenVolume +
                ", canUseVolume=" + canUseVolume +
                ", onRoadVolume=" + onRoadVolume +
                ", yesterdayVolume=" + yesterdayVolume +
                ", lastPrice=" + lastPrice +
                ", avgOpenPrice=" + avgOpenPrice +
                ", profitRate=" + profitRate +
                ", futureTradeType=" + futureTradeType +
                ", expireDate='" + expireDate + '\'' +
                ", comTradeID='" + comTradeID + '\'' +
                ", legId=" + legId +
                ", totalCost=" + totalCost +
                ", singleCost=" + singleCost +
                ", coveredVolume=" + coveredVolume +
                ", sideFlag=" + sideFlag +
                ", referenceRate=" + referenceRate +
                ", structFundVol=" + structFundVol +
                ", redemptionVolume=" + redemptionVolume +
                ", pREnableVolume=" + pREnableVolume +
                ", realUsedMargin=" + realUsedMargin +
                ", royalty=" + royalty +
                ", stockLastPrice=" + stockLastPrice +
                ", staticHoldMargin=" + staticHoldMargin +
                ", optCombUsedVolume=" + optCombUsedVolume +
                ", enableExerciseVolume=" + enableExerciseVolume +
                ", accountKey='" + accountKey + '\'' +
                '}';
    }
}
